﻿using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace MetroManagement
{
    /// <summary>
    /// 线路站点类
    /// </summary>
    public class LineStation : Entity
    {
        /// <summary>线路Id</summary>
        public int LineId { get; protected set; }

        /// <summary>线路</summary>
        [ForeignKey("LineId")]
        public Line Line { get; protected set; }

        /// <summary>站点Id</summary>
        public int StationId { get; protected set; }

        /// <summary>站点</summary>
        [ForeignKey("StationId")]
        public Station Station { get; protected set; }

        /// <summary>顺序</summary>
        public int Seq { get; private set; }

        private LineStation() { }

        public override object[] GetKeys()
        {
            return new object[]
            {
                LineId,
                StationId
            };
        }
    }
}